/**
 * 
 */
package jgame.StoryTeller;

import java.util.ArrayList;

/**
 * @author Justin
 *
 * A Story Scene is the current scene, and contains a unique ID, a description of the scene, 
 * and a list of branches to other scenes.
 */
public class JGameStoryScene {

	private int INT_ID;
	private String TEXT;
	private ArrayList<JGameStoryBranch> BRANCHES;
	
	public JGameStoryScene(int int_id, String text, ArrayList<String> branches)
	{
		BRANCHES = new ArrayList<JGameStoryBranch>();
		
		INT_ID = int_id;
		TEXT = text;
		
		for(int i = 0; i<branches.size(); i++)
		{
			BRANCHES.add(new JGameStoryBranch(Integer.parseInt(branches.get(i).substring(1,7)),branches.get(i).substring(8,branches.get(i).length())));
		}
	}
	
	public int getIntID()
	{
		return INT_ID;
	}
	
	public String getText()
	{
		return TEXT;
	}
	
	public ArrayList<JGameStoryBranch> getBranches()
	{
		return BRANCHES;
	}
	
	public void test()
	{
		System.out.println(INT_ID + ": " + TEXT);
		for(int i = 0; i<BRANCHES.size(); i++)
		{
			BRANCHES.get(i).test();
		}
	}
}
